<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>13-Vue指令-v-for</title>
</head>
<body>
    <div id="app">
        <h1>小达水果店</h1>
        <ul>
            <li v-for="(item,index) in list">
                {{ item }} - {{index}}
            </li>
            <!-- <li>苹果</li>
            <li>葡萄</li>
            <li>山竹</li>
            <li>猕猴桃</li> -->
        </ul>

        <ul>
            <li v-for="item in list">
                {{ item }} 
            </li>
        </ul>
    </div>

    <script src="https://cdn.jsdelivr.net/npm/vue@2.7.16/dist/vue.js"></script>
    <script>
        const app = new Vue({
            el:'#app',
            data:{
                list:['西瓜','苹果','葡萄','山竹','猕猴桃']
            }
        })
    </script>
</body>
</html>